from django.http import HttpResponse
from django.middleware.common import CommonMiddleware


class CorsMiddleware(CommonMiddleware):
    def process_response(self, request, response):
        response['Access-Control-Allow-Origin'] = '*'
        return response
